home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource2
/
sclib_2
/
2_7
/
v6n7051a.txt
< prev
next >
Wrap
Text File
|
1995-11-01
|
834b
|
20 lines
Example 1: C-SPRITE Macro Language
1 def example1 {
2 .count = 0
3 roff
4 while (.count < #0) { ; test against 1st parameter
5 g .symcmp+11, .xcexit ; break at .xcexit
6 if (ip == .xcexit) { ; are we at the end?
7 g ; yes, let program finish
8 break; ; ...and stop the loop
9 }
10 .count++
11 if (.count == 0t10) continue ; return to top of loop
12 echo This is the 10th iteration
13 ds [.p] .l1 ; display two strings only
14 ds [.#1] .l1 ; on the 10th iteration...
15 }
16 }